import request from '@/utils/request'
import { transformQueryCondition } from '@/utils'

// 检索
export function selectSysSubsys(query) {
  const searchCon = transformQueryCondition(query)
  return request({
    url: '/api/SysSubsys/select',
    method: 'POST',
    data: searchCon
  })
}
// 检索
export function saveArticlesList(query) {
  return request({
    url: '/ccmit-cloud-prod-subject/product/save',
    method: 'POST',
    data: query
  })
}
// 删除文章
export function delArticles(query) {
  return request({
    url: '/ccmit-cloud-prod-subject/product/delete',
    method: 'POST',
    data: query
  })
}
// 查询文章列表
export function searchArticleList(query) {
  let url = '/zcm/zcm/nrfb/app/getDraftSelectionListApp/' + query.idFirst
  url += query.idSecond ? '/' + query.idSecond : ''
  url += '/' + query.page + '/' + query.rows
  return request({
    url: url,
    method: 'get'
  })
}
// 上移下移文章
export function upArticles(query) {
  console.log(query)
  return request({
    url: '/ccmit-cloud-prod-subject/product/update',
    method: 'POST',
    data: query
  })
}
